"use strict";
exports.__esModule = true;
var Result = /** @class */ (function () {
    function Result(code, data, msg) {
        this.code = code;
        this.data = data;
        this.msg = msg;
    }
    Result.ok = function (data) {
        return new Result(200, data, "成功");
    };
    Result.err = function (data) {
        return new Result(500, data, "失败");
    };
    Result.prototype.setCode = function (code) {
        this.code = code;
        return this;
    };
    Result.prototype.setData = function (data) {
        this.data = data;
        return this;
    };
    Result.prototype.setMsg = function (msg) {
        this.msg = msg;
        return this;
    };
    return Result;
}());
exports["default"] = Result;
